package com.itheima.sh.client.fallback;

import com.itheima.sh.client.UserFeignApi;
import com.itheima.sh.pojo.User;
import org.springframework.stereotype.Component;

@Component  //作为一个容器扫描
public class UserFeignApiFallBack implements UserFeignApi {

    //这个方法也是降级方法
    @Override
    public User queryById(String username) {
        User user=new User();
        user.setUsername(username);
        user.setName("feiqn 暂停服务");
        return user;
    }
}
